package com.dissertation.action;

import com.dissertation.model.Template;
import com.dissertation.service.TemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("template")
public class TemplateController {
    @Autowired
    TemplateService templateService;

    @PostMapping("create")
    public String createTemplate(@RequestBody Template template){
        return templateService.insertTemplate(template);
    }

}
